<%@ page import="com.gaozhaoyang.entity.User" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: 754165242
  Date: 2022/3/7
  Time: 21:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--获取到后台requst域对象中的数据--%>
<%
    ArrayList<User> list =(ArrayList<User>) request.getAttribute("list");
%>
<table width="400px" height="150px" border="1px" cellspacing="0px" align="center">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>爱好</th>
    </tr>
    <%for (int i=0;i<list.size();i++){%>

    <tr>
        <td><%=list.get(i).getUid()%></td>
        <td><%=list.get(i).getName()%></td>
        <td><%=list.get(i).getHobby()%></td>
    </tr>

    <%}%>
</table>
</body>
</html>
